From: Carlos Garnacho Date: Fri, 22 Sep 2023 11:21:32 +0000 (+0200) Subject: slider: Ignore left/right scroll directions X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~301^2^2~29 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=2baa298e391e8528cdcbd1d27c50342ed4b2432a;p=gnome-shell.git slider: Ignore left/right scroll directions Both of these ended up with a "undefined" delta, which turned the final value into 0 no matter the previous state. While this was already fixed for touchpads in the previous commit (by not forwarding emulated discrete events), this looks somewhat out of place even for the mice that have left/right discrete scroll actions (e.g. tilting the scroll wheel left or right). Let these unhandled directions have a delta of 0, and focus on vertical scroll for both smooth and discrete events. Part-of: --- diff --git a/js/ui/slider.js b/js/ui/slider.js index 0aea6d40d..111c48229 100644 --- a/js/ui/slider.js +++ b/js/ui/slider.js @@ -141,7 +141,7 @@ export const Slider = GObject.registerClass({ scroll(event) { let direction = event.get_scroll_direction(); - let delta; + let delta = 0; if (event.get_flags() & Clutter.EventFlags.FLAG_POINTER_EMULATED) return Clutter.EVENT_PROPAGATE;